/*
 * @Author: rsl
 * @Date: 2019-07-04 19:10:09
 * @LastEditors: rsl
 * @LastEditTime: 2019-07-04 22:25:31
 * @Description: 日期导航组件
 */

Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },
  /**
   * 在组件实例进入页面节点树时执行
   */
  attached: function() {
    const monthsInEngSimple = ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sept.', 'Oct.', 'Nov.', 'Dec.']
    const monthsInEng = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
    const year = new Date().getFullYear()
    const month = monthsInEng[new Date().getMonth()]
    const monthSimple = monthsInEngSimple[new Date().getMonth()]
    const day = new Date().getDate()
    this.setData({
      year: year,
      monthSimple: monthSimple,
      month: month,
      day: day
    })
  },
  /**
   * 组件的初始数据
   */
  data: {
    year: '2017',
    monthSimple: 'Nov.',
    month: 'November',
    day: '5'
  },

  /**
   * 组件的方法列表
   */
  methods: {

  }
})
